Slave device, time synchronization method in slave device, master device, and electronic equipment system

ABSTRACT

A slave device includes: a clock unit that outputs time information; a message receiving unit that receives messages sent from a master device; a message sending unit that sends messages to the master device; a calculation unit that calculates a correction value necessary for correcting the time on the clock unit; and a correction unit that corrects the time on the clock unit based on the correction value calculated by the calculation unit.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a slave device, a time synchronizationmethod in the slave device, a master device, and an electronic equipmentsystem. More particularly, the present invention relates to slavedevices enabling realization of time synchronization with a masterdevice with high precision.

2. Description of the Related Art

In recent years, more and more media are digitalized, and many devicesrecording video streams in digital forms are commercialized asrepresented by video cameras. Moreover, with the digitalization of videostreams, an environment has become widespread in which video streams canbe edited easily.

An editing operation will be considered in which video streams capturedwith a plurality of video cameras are combined into a single videostream. This operation uses a method that correlates the video streamswith the capturing times with reference to the timestamps of the videostreams to switch between video data captured at the same time, thusconstructing a single video stream in which video data are arranged inaccordance with the capturing times.

For this to be successful, the internal clocks of all the video camerasused need be correctly synchronized to each other. In the related art,the IEEE 1588 protocol is known to be used for achieving timesynchronization of the internal clocks of each electronic equipment inan electronic equipment system in which a plurality of video cameras,for example, is connected via Ethernet (registered trademark).

As is well known in the art, according to the IEEE 1588 protocol (see“Precision Clock Synchronization Protocol for Networked Measurement andControl System”), a slave device calculates and corrects a timedifference (Offset) between a master device and the slave device and apath delay (Delay) including a latency between networks or devices, thussynchronizing the time on the slave device to the time on the masterdevice.

FIG. 5 illustrates an exemplary configuration of an electronic equipmentsystem 200 in which time synchronization is achieved using the IEEE 1588protocol. The electronic equipment system 200 includes a master device210 and a slave device 220. For example, when the electronic equipmentsystem 200 is a camera system including a plurality of video cameras,the master device 210 is a video camera serving as a parent device, andthe slave device 220 is a video camera serving as a child device.Furthermore, when the electronic equipment system 200 is a controlsystem including a controlling device (computer) and a plurality ofcontrolled devices, the master device 210 is the controlling device, andthe slave device 220 is the controlled device.

For simplicity's sake, only one slave device 220 is illustrated in FIG.5. In addition, only those portions related to time synchronization areillustrated in FIG. 5 as the configuration of the master device 210 andthe slave device 220, and other portions are omitted.

The master device 210 includes a clock unit 211, a master clockgenerator 212, a message sending unit 213, and a message receiving unit214.

The clock unit 211 is configured by a counter that is counted up withmaster clocks CLKm that are generated by the master clock generator 212.In the case of a video system such as a camera system, the frequency ofthe master clocks CLKm is 27 MHz, for example, which is typically usedas a reference frequency for video transfer. The time information(counter value) that is output from the clock unit 211 is supplied tothe message sending unit 213 and the message receiving unit 214.

The message sending unit 213 sends a PTP (Precision Time Protocol)message to the slave device 220 via a transmission line 230 such asEthernet (registered trademark). Here, in order to include the timeinformation in the PTP message, it is necessary to convert the countervalue serving as the time information to a value in a nanosecond (ns)unit. For this purpose, the message sending unit 213 is provided with acounter-value/ns converter 213 a that performs conversion from thecounter value to the value in a nanosecond (ns) unit. The messagereceiving unit 214 receives a PTP message that is sent from the slavedevice 220 via the transmission line 230.

The PTP message that the message sending unit 213 sends to the slavedevice 220 includes a Sync message, a FollowUp message, and aDelayResponse message. The Sync message is sent to initiate a timesynchronization operation. The FollowUp message is sent to convey thetime information of the master device 210 after the Sync message issent. The DelayResponse message is sent as a response to alater-described DelayRequest message after the message receiving unit214 receives the DelayRequest message from the slave device 220.

The slave device 220 includes a clock unit 221, a slave clock generator222, a message receiving unit 223, a message sending unit 224, acalculation unit 225, and a correction unit 226.

The clock unit 221 is configured by a counter that is counted up withslave clocks CLKs that are generated by the slave clock generator 222.In the case of a video system such as a camera system, the frequency ofthe slave clocks CLKs is 27 MHz, for example, similar to the frequencyof the master clocks CLKm described above, which is typically used as areference frequency for video transfer. The time information (countervalue) that is output from the clock unit 221 is supplied to the messagereceiving unit 223 and the message sending unit 224.

The message receiving unit 223 receives the PTP message that is sentfrom the master device 210 via the transmission line 230. As describedabove, the time information contained in the PTP message that is sentfrom the master device 210 is information of a value in a nanosecond(ns) unit. For this purpose, the message receiving unit 223 is providedwith an ns/counter-value converter 223 a that performs conversion fromthe value in a nanosecond (ns) unit to the counter value. The messagesending unit 224 sends a PTP message to the master device 210 via thetransmission line 230.

The PTP message that the message sending unit 224 sends to the masterdevice 210 includes a DelayRequest message. The DelayRequest message issent to request the master device 210 to issue a DelayResponse messageafter the FollowUp message sent from the master device 210 is receivedby the message receiving unit 223.

The calculation unit 225 calculates a correction value necessary forcorrecting the time on the clock unit 221. Specifically, the calculationunit 225 calculates, as the correction value, an offset of the timeSt(x) on the clock unit 221 of the slave device 220 relative to the timeMt(x) on the clock unit 211 of the master device 210 by the followingequation (1).Offset={(t2−t1)−(t4−t3)}/2  (1)

In the equation above, time t2 is the time at which the Sync message isreceived by the message receiving unit 223. Time t1 is the timerepresented by the time information of the FollowUp message that isreceived by the message receiving unit 223. Time t4 is the timerepresented by the time information of the DelayResponse message that isreceived by the message receiving unit 223. Finally, time t3 is the timeat which the message sending unit 224 sent (issued) the DelayRequestmessage to the master device 210.

The correction unit 226 corrects the time on the clock unit 221 based onthe offset which is the correction value calculated by the calculationunit 225. The time St(x) on the clock unit 221, which is not corrected,is in a state such that an offset is added to the time Mt(x) on theclock unit 211 of the master device 210. Therefore, the correction unit226 corrects the time St(x) on the clock unit 221 at the timingssynchronized to the slave clocks CLKs generated from the slave clockgenerator 222 so that the time St(x) has a value subtracted by theoffset.

FIG. 6 illustrates a sequence diagram of the time synchronizationoperation performed in the electronic equipment system 200 illustratedin FIG. 5.

(a) The time synchronization operation is initiated with the messagesending unit 213 of the master device 210 sending a Sync message to theslave device 220. In this case, in the message sending unit 213, theissuance (sending) time t1 of the Sync message is stored in the form ofthe counter value which is the output of the clock unit 211.

(b) In the message receiving unit 223 of the slave device 220, the Syncmessage sent from the master device 210 is received, and the receipttime t2 of the Sync message is stored in the form of the counter valuewhich is the output of the clock unit 221.

(c) Next, a FollowUp message is sent to the slave device 220 from themessage sending unit 213 of the master device 210. The FollowUp messagecontains the time information representing the issuance time t1 of theSync message in the form of a value in a nanosecond (ns) unit. In thiscase, the counter value representing the time t1 is converted to thevalue in a nanosecond (ns) unit by the counter-value/ns converter 213 aof the message sending unit 213.

(d) In the message receiving unit 223 of the slave device 220, theFollowUp message sent from the master device 210 is received, and avalue in a nanosecond (ns) unit representing the time t1 is acquired.Moreover, this value is converted to the counter value, which is theoutput of the clock unit 221 and represents the time t1, by thens/counter-value converter 223 a and the counter value stored in themessage receiving unit 223.

(e) Next, a DelayRequest message is sent to the master device 210 fromthe message sending unit 224 of the slave device 220. In this case, inthe message sending unit 224, the issuance (sending) time t3 of theDelayRequest message is stored in the form of the counter value which isthe output of the clock unit 221.

(f) In the message receiving unit 214 of the master device 210, theDelayRequest message sent from the slave device 220 is received, and thereceipt time t4 of the DelayRequest message is stored in the form of thecounter value which is the output of the clock unit 211.

(g) Next, a DelayResponse message is sent to the slave device 220 fromthe message sending unit 213 of the master device 210. The DelayResponsemessage contains the time information representing the time t4 when theDelayRequest message is received by the message receiving unit 214 inthe form of a value in a nanosecond (ns) unit. In this case, the countervalue representing the time t4 is converted to a value in a nanosecond(ns) unit by the counter-value/ns converter 213 a of the message sendingunit 213.

(h) In the message receiving unit 223 of the slave device 220, theDelayResponse message sent from the master device 210 is received, andthe value in a nanosecond (ns) unit representing the time t4 isacquired. Moreover, this value is converted to the counter value, whichis the output of the clock unit 221 and represents the time t4, by thens/counter-value converter 223 a, and stored in the message receivingunit 223.

(i) Next, in the calculation unit 225 of the slave device 220, an offsetserving as a correction value is calculated by the above-mentionedequation (1) using the counter values, which are stored in the messagereceiving unit 223 and represent the times t1, t2, and t4, and thecounter value which is stored in the message sending unit 224 andrepresents the time t3. Moreover, the time St(x) on the clock unit 221is corrected by the correction unit 226 so that the time St(x) has avalue subtracted by the offset. In this way, the corrected time St(x)′on the clock unit 221 is in agreement with the time Mt(x) on the clockunit 211 of the master device 210, and synchronization is achieved.

SUMMARY OF THE INVENTION

According to the time synchronization operation described above, thecalculation unit 225 of the slave device 220 calculates the offset ofthe time St(x) on the clock unit 221 of the slave device 220 relative tothe time Mt(x) on the clock unit 211 of the master device 210 by theequation (1). In this case, since {(t2−t1)−(t4−t3)} is divided by 2, theresult of the offset calculation will typically contain an error of 0.5.Therefore, when the time on the clock unit 221 is corrected using theresult of the offset calculation containing such an error, the slavedevice 220 will be unable to achieve time synchronization with themaster device 210 with high precision.

It is therefore desirable to realize time synchronization between amaster device and slave devices with high precision.

According to an embodiment of the present invention, there is provided aslave device including: a clock unit that outputs time information; amessage receiving unit that receives messages sent from a master device;a message sending unit that sends messages to the master device; acalculation unit that calculates a correction value necessary forcorrecting the time on the clock unit; and a correction unit thatcorrects the time on the clock unit based on the correction valuecalculated by the calculation unit, wherein: the message receiving unitreceives a first message that the master device issued at a first timeand a second message that contains time information representing thefirst time and that the master device issued at a time later than thefirst time; the calculation unit calculates a first correction value bysubtracting the first time represented by the time information which iscontained in the second message received by the message receiving unitfrom a second time which is the time at which the first message isreceived by the message receiving unit; the correction unit performs afirst stage of correction so that the time on the clock unit has a valuesubtracted by the first correction value calculated by the calculationunit; the message sending unit issues a third message to the masterdevice at a third time after the first stage of correction is performedby the correction unit; the message receiving unit receives a fourthmessage that contains time information representing a fourth time atwhich the third message is received, the fourth message being issuedafter the third message is received by the master device; thecalculation unit calculates a second correction value by subtracting thethird time at which the third message is issued by the message sendingunit from the fourth time represented by the time information which iscontained in the fourth message received by the message receiving unitand dividing a subtraction result obtained thus by 2; and the correctionunit performs a second stage of correction after the first stage ofcorrection is performed so that the time on the clock unit has a valueadded by the second correction value calculated by the calculation unit.

In the embodiment of the present invention, the time on the clock unitof the slave device is corrected in two stages. In the first stage ofcorrection, the first correction value is used which is calculated bysubtracting the first time, at which a message is issued by the masterdevice, from the second time at which the message is received. Then, thetime on the clock unit of the slave device is corrected so that the timehas a value subtracted by the first correction value. In this way, thecorrected time on the clock unit of the slave device has a valuecorresponding to a subtraction of a transmission delay component (Delay)between the master device and the slave device from the time on theclock unit of the master device. Thus, the corrected time is in a statesuch that an offset component is excluded.

Moreover, in the second stage of correction, the second correction valueis used which is calculated by subtracting the third time, at which amessage is sent, from the fourth time, at which the message is receivedby the master device, and dividing a subtraction result obtained thus by2. Then, the time on the clock unit of the slave device is corrected sothat the time has a value subtracted by the second correction value. Inthis way, the time on the clock unit of the slave device is in agreementwith the time on the master device, and thus time synchronization isachieved.

Therefore, in the embodiment of the present invention, the time on theclock unit of the slave device is not corrected using the result of theoffset calculation containing such an error as in the case of therelated art. For this reason, the slave device is able to achieve timesynchronization with the master device with high precision.

In the embodiment of the present invention, the clock unit may beconfigured, for example, by a counter that is counted up with clocks ofa predetermined frequency, and the time information which is containedin the second and fourth messages received by the message receiving unitmay be a counter value.

In this manner, by sending the time information from the master deviceto the slave device in the form of the counter value, it is notnecessary to perform the operation where the master device converts thecounter value to a value in a nanosecond (ns) unit, for example, and theoperation where the slave device converts the value in a nanosecond (ns)unit to the counter value. For this reason, the time informationsupplied from the master device to the slave device will be accuratetime information containing no calculation errors during the conversion.Accordingly, the slave device is able to achieve time synchronizationwith the master device with higher precision.

According to the embodiment of the present invention, since the time onthe clock unit of the slave device is not corrected using the result ofthe offset calculation containing such an error as in the case of therelated art, the slave device is able to achieve time synchronizationwith the master device with high precision.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic block diagram illustrating an exemplaryconfiguration of an electronic equipment system according to a firstembodiment of the present invention.

FIG. 2 is a sequence diagram illustrating a time synchronizationoperation performed in the electronic equipment system according to thefirst embodiment.

FIG. 3 is a schematic block diagram illustrating an exemplaryconfiguration of an electronic equipment system according to a secondembodiment of the present invention.

FIG. 4 is a sequence diagram illustrating a time synchronizationoperation performed in the electronic equipment system according to thesecond embodiment.

FIG. 5 is a schematic block diagram illustrating an exemplaryconfiguration of an electronic equipment system in which timesynchronization is achieved using the IEEE 1588 protocol.

FIG. 6 is a sequence diagram illustrating a time synchronizationoperation which is performed in the electronic equipment system usingthe IEEE 1588 protocol.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

Hereinafter, modes (hereinafter referred to as embodiments) for carryingout the present invention will be described. The description will begiven in the following order.

1. First Embodiment

2. Second Embodiment

3. Modified Embodiment

1. First Embodiment

Exemplary Configuration of Electronic Equipment System

FIG. 1 illustrates an exemplary configuration of an electronic equipmentsystem 100 according to the first embodiment. The electronic equipmentsystem 100 includes a master device 110 and a slave device 120. Forexample, when the electronic equipment system 100 is a camera systemincluding a plurality of video cameras, the master device 110 is a videocamera serving as a parent device, and the slave device 120 is a videocamera serving as a child device. Furthermore, when the electronicequipment system 100 is a control system including a controlling device(computer) and a plurality of controlled devices, the master device 110is the controlling device, and the slave device 120 is the controlleddevice.

For the simplicity's sake, only one slave device 120 is illustrated inFIG. 1. In addition, only those portions related to time synchronizationare illustrated in FIG. 1 as the configuration of the master device 110and the slave device 120, and other portions are omitted.

The master device 110 includes a clock unit 111, a master clockgenerator 112, a message sending unit 113, and a message receiving unit114.

The clock unit 111 is configured by a counter that is counted up withmaster clocks CLKm that are generated by the master clock generator 112.In the case of a video system such as a camera system, the frequency ofthe master clocks CLKm is 27 MHz, for example, which is typically usedas a reference frequency for video transfer. The time information(counter value) that is output from the clock unit 111 is supplied tothe message sending unit 113 and the message receiving unit 114.

The message sending unit 113 sends a PTP (Precision Time Protocol)message to the slave device 120 via a transmission line 130 such asEthernet (registered trademark). Here, in order to include the timeinformation in the PTP message, it is necessary to convert the countervalue serving as the time information to a value in a nanosecond (ns)unit. For this purpose, the message sending unit 113 is provided with acounter-value/ns converter 113 a that performs conversion from thecounter value to the value in a nanosecond (ns) unit. The messagereceiving unit 114 receives a PTP message that is sent from the slavedevice 120 via the transmission line 130.

The PTP message that the message sending unit 113 sends to the slavedevice 120 includes a Sync message, a FollowUp message, and aDelayResponse message. The Sync message is sent to initiate a timesynchronization operation. The FollowUp message is sent to convey thetime information of the master device 110 after the Sync message issent. The DelayResponse message is sent as a response to alater-described DelayRequest message after the message receiving unit114 receives the DelayRequest message from the slave device 120.

The slave device 120 includes a clock unit 121, a slave clock generator122, a message receiving unit 123, a message sending unit 124, acalculation unit 125, and a correction unit 126.

The clock unit 121 is configured by a counter that is counted up withslave clocks CLKs that are generated by the slave clock generator 122.In the case of a video system such as a camera system, the frequency ofthe slave clocks CLKs is 27 MHz, for example, similar to the frequencyof the master clocks CLKm described above, which is typically used as areference frequency for video transfer. The time information (countervalue) that is output from the clock unit 121 is supplied to the messagereceiving unit 123 and the message sending unit 124.

The message receiving unit 123 receives the PTP message that is sentfrom the master device 110 via the transmission line 130. As describedabove, the time information contained in the PTP message that is sentfrom the master device 110 is information of a value in a nanosecond(ns) unit. For this purpose, the message receiving unit 123 is providedwith an ns/counter-value converter 123 a that performs conversion fromthe value in a nanosecond (ns) unit to the counter value. The messagesending unit 124 sends a PTP message to the master device 110 via thetransmission line 130.

The PTP message that the message sending unit 124 sends to the masterdevice 110 includes a DelayRequest message. The DelayRequest message issent to request the master device 110 to issue a DelayResponse messageafter the FollowUp message sent from the master device 110 is receivedby the message receiving unit 123, and a first stage of correctiondescribed later is performed by the correction unit 126.

The calculation unit 125 calculates a correction value necessary forcorrecting the time on the clock unit 121. Specifically, the correctionvalue includes a first correction value used in a first stage ofcorrection and a second correction value used in a second stage ofcorrection. The calculation unit 125 calculates (t2−t1) as the firstcorrection value. Here, time t2 is the time at which the Sync message isreceived by the message receiving unit 123. Time t1 is the timerepresented by the time information of the FollowUp message that isreceived by the message receiving unit 123. Moreover, the calculationunit 125 calculates (t4−t3)/2 as the second correction value. Here, t4is the time represented by the time information of the DelayResponsemessage that is received by the message receiving unit 123. Time t3 isthe time at which the message sending unit 124 sent (issued) theDelayRequest message to the master device 110.

The correction unit 126 performs a first stage of correction and asecond stage of correction. That is to say, in the first stage ofcorrection, the correction unit 126 corrects the time St(x) on the clockunit 121 based on the first correction value calculated by thecalculation unit 125. In this case, the correction unit 126 corrects thetime St(x) on the clock unit 121 at the timings synchronized to theslave clocks CLKs generated from the slave clock generator 122 so thatthe time St(x) has a value subtracted by the first correction value“(t2−t1)”.

In this case, the corrected time St(x)′ on the clock unit 121 has avalue corresponding to a subtraction of a transmission delay component(Delay) between the master device 110 and the slave device 120 from thetime Mt(x) on the clock unit 111 of the master device 110. Thus, thecorrected time St(x)′ is in a state such that an offset component(Offset) is excluded.

That is to say, if it is assumed that a difference between the timeSt(x) on the clock unit 121 of the slave device 120, which is notcorrected, and the time Mt(x) on the clock unit 111 of the master device110 is Offset, then, the following equation (2) is satisfied.St(x)−Mt(x)=Offset  (2)

When the equation (2) is modified, an equation (3) below is obtained.St(x)=Offset+Mt(x)  (3)

If it is assumed that a transmission delay between the master device 110and the slave device 120 is Delay, then the first correction value(t2−t1) can be expressed as an addition of Offset and Delay as given inthe following equation (4).(t2−t1)=Offset+Delay  (4)

The first stage of correction can be expressed by the following equation(5).St(x)′=St(x)−(t2−t1)  (5)

When the above-mentioned equations (3) and (4) are substituted into thisequation (5), the following equation (6) is obtained.St(x)′=(Offset+Mt(x))−(Offset+Delay)=Mt(x)−Delay  (6)

In this way, the corrected time St(x)′ obtained in the first stage ofcorrection has a value corresponding to a subtraction of a transmissiondelay component (Delay) between the master device 110 and the slavedevice 120 from the time Mt(x) on the clock unit 111 of the masterdevice 110. Thus, the corrected time St(x)′ is in a state such that anoffset component (Offset) is excluded.

Moreover, in the second stage of correction, the correction unit 126corrects the corrected time St(x)′ on the clock unit 121 based on thesecond correction value calculated by the calculation unit 125. In thiscase, the correction unit 126 corrects the corrected time St(x)′ on theclock unit 121 at the timings synchronized to the slave clocks CLKsgenerated from the slave clock generator 122 so that the corrected timeSt(x)′ has a value added by the second correction value “(t4−t3)/2”.

In this case, the corrected time St(x)″ on the clock unit 121 is inagreement with the time Mt(x) on the clock unit 111 of the master device110, and time synchronization with the master device 110 is achieved.

That is to say, from the above-mentioned equation (6), t4 is(Mt(x)+Delay) when t3 is (Mt(x)−Delay). Therefore, (t4−t3)/2 is theDelay as given in the following equation (7).

$\begin{matrix}\begin{matrix}{{\left( {{t\; 4} - {t\; 3}} \right)/2} = {\left\{ {\left( {{{Mt}(x)} + {Delay}} \right) - \left( {{{Mt}(x)} - {Delay}} \right)} \right\}/2}} \\{= {{2*{{Delay}/2}} = {Delay}}}\end{matrix} & (7)\end{matrix}$

The second stage of correction can be expressed by the followingequation (8).St(x)″=St(x)′+(t4−t3)/2  (8)

When the above-mentioned equations (6) and (7) are substituted into thisequation (8), the following equation (9) is obtained.St(x)″=(Mt(x)−Delay)+Delay=Mt(x)  (9)

In this way, the corrected time St(x)″ obtained in the second stage ofcorrection is in agreement with the time Mt(x) on the clock unit 111 ofthe master device 110, and time synchronization with the master device110 is achieved.

Time Synchronization Operation

FIG. 2 illustrates a sequence diagram illustrating the timesynchronization operation performed in the electronic equipment system100 illustrated in FIG. 1.

(a) The time synchronization operation is initiated with the messagesending unit 113 of the master device 110 sending a Sync message to theslave device 120. In this case, in the message sending unit 113, theissuance (sending) time t1 of the Sync message is stored in the form ofthe counter value which is the output of the clock unit 111.

(b) In the message receiving unit 123 of the slave device 120, the Syncmessage sent from the master device 110 is received, and the receipttime t2 of the Sync message is stored in the form of the counter valuewhich is the output of the clock unit 121.

(c) Next, a FollowUp message is sent to the slave device 120 from themessage sending unit 113 of the master device 110. The FollowUp messagecontains the time information representing the issuance time t1 of theSync message as a value in a nanosecond (ns) unit. In this case, thecounter value representing the time t1 is converted to the value in ananosecond (ns) unit by the counter-value/ns converter 113 a of themessage sending unit 113.

(d) In the message receiving unit 123 of the slave device 120, theFollowUp message sent from the master device 110 is received, and avalue in a nanosecond (ns) unit representing the time t1 is acquired.Moreover, this value is converted to the counter value, which is theoutput of the clock unit 121 and represents the time t1, by thens/counter-value converter 123 a, and the counter value is stored in themessage receiving unit 123.

(e) Next, in the calculation unit 125 of the slave device 120, (t2−t1)serving as a first correction value is calculated using the countervalues which are stored in the message receiving unit 123 and representthe times t1 and t2. Then, the time St(x) on the clock unit 121 iscorrected by the correction unit 126 so that the time St(x) has a valuesubtracted by the first correction value “(t2−t1)” (see the equation(5)). The corrected time St(x)′ on the clock unit 121 has a valuecorresponding to a subtraction of a transfer delay component (Delay)between the master device 110 and the slave device 120 from the timeMt(x) on the clock unit 111 of the master device 110. Thus, thecorrected time St(x)′ is in a state such that an offset component(Offset) is excluded (see the equation (6)).

(f) Next, a DelayRequest message is sent to the master device 110 fromthe message sending unit 124 of the slave device 120. In this case, inthe message sending unit 124, the issuance (sending) time t3 of theDelayRequest message is stored in the form of the counter value which isthe output of the clock unit 121.

(g) In the message receiving unit 114 of the master device 110, theDelayRequest message sent from the slave device 120 is received, and thereceipt time t4 of the DelayRequest message is stored in the form of thecounter value which is the output of the clock unit 111.

(h) Next, a DelayResponse message is sent to the slave device 120 fromthe message sending unit 113 of the master device 110. The DelayResponsemessage contains the time information representing the time t4 when theDelayRequest message is received by the message receiving unit 114 as avalue in a nanosecond (ns) unit. In this case, the counter valuerepresenting the time t4 is converted to a value in a nanosecond (ns)unit by the counter-value/ns converter 113 a of the message sending unit113.

(i) In the message receiving unit 123 of the slave device 120, theDelayResponse message sent from the master device 110 is received, andthe value in a nanosecond (ns) unit representing the time t4 isacquired. Moreover, this value is converted to the counter value, whichis the output of the clock unit 121 and represents the time t4, by thens/counter-value converter 123 a, and the counter value is stored in themessage receiving unit 123.

(j) Next, in the calculation unit 125 of the slave device 120, a secondcorrection value “(t4−t3)/2” is calculated using the counter value,which is stored in the message receiving unit 123 and represents thetime t4, and the counter value which is stored in the message sendingunit 124 and represents the time t3. Moreover, the corrected time St(x)′on the clock unit 121 is corrected by the correction unit 126 so thatthe corrected time St(x)′ has a value added by the second correctionvalue “(t4−t3)/2” (see the equation (8)). In this way, the correctedtime St(x)″ on the clock unit 121 is in agreement with the time Mt(x) onthe clock unit 111 of the master device 110 (see the equation (9)).

As described above, according to the time synchronization operationperformed in the electronic equipment system 100 illustrated in FIG. 1,the time on the clock unit 121 of the slave device 120 is corrected intwo stages.

In the first stage of correction, the first correction value “(t2−t1)”is used which is calculated by subtracting the first time t1, at which amessage is issued by the master device 110, from the second time t2 atwhich the message is received. Then, the time St(x) on the clock unit121 of the slave device 120 is corrected so that the time St(x) has avalue subtracted by the first correction value. In this way, thecorrected time St(x)′ has a value corresponding to a subtraction of atransmission delay component (Delay) between the master device 110 andthe slave device 120 from the time Mt(x) on the clock unit 111 of themaster device 110. Thus, the corrected time St(x)′ is in a state suchthat an offset component (Offset) is excluded.

Moreover, in the second stage of correction, the second correction value“(t4−t3)/2” is used which is calculated by subtracting the third timet3, at which a message is sent, from the fourth time t4, at which themessage is received by the master device 110, and dividing a subtractionresult obtained thus by 2. Then, the corrected time St(x)′ on the clockunit 121 of the slave device 120 is corrected so that the corrected timeSt(x)′ has a value added by the second correction value. In this way,the corrected time St(x)″ on the clock unit 121 of the slave device 120is in agreement with the time Mt(x) on the clock unit 111 of the masterdevice 110, and thus time synchronization is achieved.

Therefore, in the electronic equipment system 100 illustrated in FIG. 1,the time on the clock unit 121 of the slave device 120 is not correctedusing the result of the offset calculation containing such an error asin the case of the related art. For this reason, the slave device 120 isable to achieve time synchronization with the master device 110 withhigh precision.

2. Second Embodiment

Exemplary Configuration of Electronic Equipment System

FIG. 3 illustrates an exemplary configuration of an electronic equipmentsystem 100A according to the second embodiment. The electronic equipmentsystem 100A includes a master device 110A and a slave device 120Asimilarly to the electronic equipment system 100 illustrated in FIG. 1.In FIG. 3, portions corresponding to those in FIG. 1 will be denoted bythe same reference numerals, and description thereof will be omitted.

The master device 110A includes a clock unit 111, a master clockgenerator 112, a message sending unit 113A, and a message receiving unit114.

The message sending unit 113A sends a PTP (Precision Time Protocol)message to the slave device 120 via a transmission line 130. The PTPmessage that the message sending unit 113A sends to the slave device 120includes a Message message in addition to the above-described Syncmessage, FollowUp message, and DelayResponse message.

The message sending unit 113A sends the Message message subsequent tothe FollowUp message to the slave device 120. As described above, theFollowUp message contains the time information representing the time t1,at which the Sync message is issued (sent), as a value in a nanosecond(ns) unit. The Message message subsequent to the FollowUp message alsocontains the time information representing the time t1, but the timeinformation is in the form of a counter value representing the time t1.

Moreover, the message sending unit 113A sends a Message messagesubsequent to the DelayResponse message to the slave device 120. Asdescribed above, the DelayResponse message contains the time informationrepresenting the time t4 when the DelayRequest message is received bythe message receiving unit 114 as a value in a nanosecond (ns) unit. TheMessage message subsequent to the DelayResponse message also containsthe time information representing the time t4, but the time informationis in the form of a counter value representing the time t4.

Other configurations of the master device 110A are the same as those ofthe master device 110 of the electronic equipment system 100 illustratedin FIG. 1.

The slave device 120A includes a clock unit 121, a slave clock generator122, a message receiving unit 123A, a message sending unit 124, acalculation unit 125, and a correction unit 126.

The frequency of the slave clocks CLKs generated by the slave clockgenerator 122 is the same as the frequency of the master clocks CLKmgenerated by the master clock generator 112 of the master device 110Adescribed above. For example, in the case of a video system such as acamera system, the frequencies of both clocks CLKm and CLKs are 27 MHz,for example, which is typically used as a reference frequency for videotransfer.

The message receiving unit 123A receives the PTP message that is sentfrom the master device 110A via the transmission line 130. As describedabove, the Message message is sent, subsequently to the FollowUpmessage, from the message sending unit 113A of the master device 110A.The message receiving unit 123A receives the FollowUp message and theMessage message which is sent subsequently thereto.

The FollowUp message contains the value in a nanosecond (ns) unit as thetime information representing the time t1. On the other hand, theMessage message contains the counter value as the time informationrepresenting the time t1. In this embodiment, the message receiving unit123A acquires and stores the counter value which is contained in theMessage message and represents the time t1. The calculation unit 125uses this time t1 [counter value] when calculating a first correctionvalue “(t2−t1)”.

Moreover, as described above, the Message message is sent, subsequentlyto the DelayResponse message, from the message sending unit 113A of themaster device 110A. The message receiving unit 123A receives theDelayResponse message and the Message message which is sent subsequentlythereto.

The DelayResponse message contains the value in a nanosecond (ns) unitas the time information representing the time t4. On the other hand, theMessage message contains the counter value as the time informationrepresenting the time t4. In this embodiment, the message receiving unit123A acquires and stores the counter value which is contained in theMessage message and represents the time t4. The calculation unit 125uses this time t4 [counter value] when calculating a second correctionvalue “(t4−t3)/2”.

Other configurations of the slave device 120A are the same as those ofthe slave device 120 of the electronic equipment system 100 illustratedin FIG. 1.

Time Synchronization Operation

FIG. 4 illustrates a sequence diagram illustrating the timesynchronization operation performed in the electronic equipment system100A illustrated in FIG. 3.

(a) The time synchronization operation is initiated with the messagesending unit 113A of the master device 110A sending a Sync message tothe slave device 120A. In this case, in the message sending unit 113A,the issuance (sending) time t1 of the Sync message is stored in the formof the counter value which is the output of the clock unit 111.

(b) In the message receiving unit 123A of the slave device 120A, theSync message sent from the master device 110A is received, and thereceipt time t2 of the Sync message is stored in the form of the countervalue which is the output of the clock unit 121.

(c) Next, a FollowUp message is sent to the slave device 120A from themessage sending unit 113A of the master device 110A. The FollowUpmessage contains the time information representing the issuance time t1of the Sync message as a value in a nanosecond (ns) unit. In this case,the counter value representing the time t1 is converted to the value ina nanosecond (ns) unit by the counter-value/ns converter 113 a of themessage sending unit 113A.

In the message receiving unit 123A of the slave device 120A, theFollowUp message sent from the master device 110A is received. However,in the message receiving unit 123A of this embodiment, the operation ofacquiring the value in nanosecond (ns) unit representing the time t1,converting the value to the counter value, and storing the counter valueis not performed.

(d) Next, a Message message is sent to the slave device 120A from themessage sending unit 113A of the master device 110A. The Message messagecontains the time information representing the issuance time t1 of theSync message as the counter value.

(e) In the message receiving unit 123A of the slave device 120A, theMessage message sent from the master device 110A is received, and thecounter value representing the time t1 is acquired and stored as it was.

(f) Next, in the calculation unit 125 of the slave device 120A, (t2−t1)serving as a first correction value is calculated using the countervalues which are stored in the message receiving unit 123A and representthe times t1 and t2. Then, the time St(x) on the clock unit 121 iscorrected by the correction unit 126 so that the time St(x) has a valuesubtracted by the first correction value “(t2−t1)” (see the equation(5)). The corrected time St(x)′ on the clock unit 121 has a valuecorresponding to a subtraction of a transfer delay component (Delay)between the master device 110A and the slave device 120A from the timeMt(x) on the clock unit 111 of the master device 110A. Thus, thecorrected time St(x)′ is in a state such that an offset component(Offset) is excluded (see the equation (6)).

(g) Next, a DelayRequest message is sent to the master device 110A fromthe message sending unit 124 of the slave device 120A. In this case, inthe message sending unit 124, the issuance (sending) time t3 of theDelayRequest message is stored in the form of the counter value which isthe output of the clock unit 121.

(h) In the message receiving unit 114 of the master device 110A, theDelayRequest message sent from the slave device 120A is received, andthe receipt time t4 of the DelayRequest message is stored in the form ofthe counter value which is the output of the clock unit 111.

(i) Next, a DelayResponse message is sent to the slave device 120A fromthe message sending unit 113A of the master device 110A. TheDelayResponse message contains the time information representing thetime t4 when the DelayRequest message is received by the messagereceiving unit 114 as a value in a nanosecond (ns) unit. In this case,the counter value representing the time t4 is converted to a value in ananosecond (ns) unit by the counter-value/ns converter 113 a of themessage sending unit 113A.

In the message receiving unit 123A of the slave device 120A, theDelayResponse message sent from the master device 110A is received.However, in the message receiving unit 123A of this embodiment, theoperation of acquiring the value in nanosecond (ns) unit representingthe time t4, converting the value to the counter value, and storing thecounter value is not performed.

(j) Next, a Message message is sent to the slave device 120A from themessage sending unit 113A of the master device 110A. The Message messagecontains the time information representing the time t4, at which theDelayRequest message is received by the message receiving unit 114, asthe counter value.

(k) In the message receiving unit 123A of the slave device 120A, theMessage message sent from the master device 110A is received, and thecounter value representing the time t4 is acquired and stored as it was.

(m) Next, in the calculation unit 125 of the slave device 120A, a secondcorrection value “(t4−t3)/2” is calculated using the counter value ofthe time t4, which is stored in the message receiving unit 123A, and thecounter value of the time t3, which is stored in the message sendingunit 124. Moreover, the corrected time St(x)′ on the clock unit 121 iscorrected by the correction unit 126 so that the corrected time St(x)′has a value added by the second correction value “(t4−t3)/2” (see theequation (8)). In this way, the corrected time St(x)″ on the clock unit121 is in agreement with the time Mt(x) on the clock unit 111 of themaster device 110A (see the equation (9)).

As described above, according to the time synchronization operationperformed in the electronic equipment system 100A illustrated in FIG. 3,the time on the clock unit 121 of the slave device 120A is corrected intwo stages, similarly to the electronic equipment system 100 illustratedin FIG. 1. Therefore, in the electronic equipment system 100Aillustrated in FIG. 3, the time on the clock unit 121 of the slavedevice 120A is not corrected using the result of the offset calculationcontaining such an error as in the case of the related art. For thisreason, the slave device 120A is able to achieve time synchronizationwith the master device 110A with high precision.

Moreover, in the electronic equipment system 100A illustrated in FIG. 3,the Message message is sent from the master device 110A to the slavedevice 120A, in which the time information of the times t1 and t4 isconveyed in the form of the counter value. In this manner, by sendingthe time information from the master device 110A to the slave device120A in the form of the counter value, it is not necessary for the timeinformation to be subjected to the operation where the master deviceconverts the counter value to the value in a nanosecond (ns) unit, forexample, and the operation where the slave device converts the value ina nanosecond (ns) unit to the counter value. For this reason, the timeinformation of the times t1 and t4 supplied from the master device 110Ato the slave device 120A will be accurate time information containing nocalculation errors during the conversion. Therefore, the calculationunit 125 is able to calculate the first correction value “(t2−t1)” andthe second correction value “(t4−t3)/2” with high precision.Accordingly, the slave device 120A is able to achieve timesynchronization with the master device 110A with higher precision.

3. Modified Embodiment

In the embodiments described above, the PTP message is used as themessage exchanged between the master device 110 or 110A and the slavedevice 120 or 120A; however, the present invention is not limited tothis.

Moreover, in the embodiments described above, the calculation unit 125and the correction unit 126 are separately provided in the slave device120 or 120A, however, the block configuration of the slave device 120 or120A is not limited to this. For example, the calculation unit 125 andthe correction unit 126 may be configured as one processing block.

The embodiment of the present invention enables realization of timesynchronization between slave devices and a master device with highprecision. Therefore, the present invention can be applied to a camerasystem requiring time synchronization among a plurality of videocameras, a control system requiring time synchronization between acontrolling device and controlled devices, and other systems requiringsuch time synchronization.

The present application contains subject matter related to thatdisclosed in Japanese Priority Patent Application JP 2009-033553 filedin the Japan Patent Office on Feb. 17, 2009, the entire contents ofwhich is hereby incorporated by reference.

It should be understood by those skilled in the art that variousmodifications, combinations, sub-combinations and alterations may occurdepending on design requirements and other factors insofar as they arewithin the scope of the appended claims or the equivalents thereof.

What is claimed is:
 1. A slave device used in a system including amaster device and the slave device, the slave device comprising:circuitry configured to: output time information; receive messagesissued from the master device; issue messages to the master device;calculate a correction value necessary to correct the output timeinformation; and correct the output time information based on thecalculated correction value, wherein the circuitry is further configuredto: receive a first message that the master device issued at a firsttime and a second message that contains time information representingthe first time and that the master device issued at a time later thanthe first time; calculate a first correction value by subtracting thefirst time represented by the time information which is contained in thesecond message from a second time which is the time at which the firstmessage is received; perform a first stage of correction so that theoutput time information has a value subtracted by the calculated firstcorrection value; issue a third message to the master device at a thirdtime after the first stage of correction is performed; receive a fourthmessage that contains time information representing a fourth time atwhich the third message is received, the fourth message issued by themaster device; calculate a second correction value by subtracting thethird time at which the third message is issued from the fourth timerepresented by the time information which is contained in the fourthmessage and dividing a subtraction result obtained thus by 2; perform asecond stage of correction after the first stage of correction isperformed so that the output time information has a value added by thecalculated second correction value; and increment the output timeinformation by utilizing a counter that is counted up with clocks of apredetermined frequency, and wherein the time information which iscontained in the second and fourth messages is a counter value that hasnot been converted into a unit of seconds.
 2. The slave device accordingto claim 1, wherein the system is a camera system including a pluralityof video cameras, and the master device and the slave device are videocameras.
 3. The slave device according to claim 1, wherein the circuitryis further configured to issue and receive messages using a precisiontime protocol.
 4. A time synchronization method in a slave device usedin a system including a master device and the slave device, the methodcomprising: receiving a first message that the master device issued at afirst time; receiving a second message that contains time informationrepresenting the first time and that the master device issued at a timelater than the first time; calculating a first correction value bysubtracting the first time represented by the time information which iscontained in the second message received from a second time which is thetime at which the first message is received; performing a first stage ofcorrection so that the time on a clock has a value subtracted by thefirst correction value; issuing a third message to the master device ata third time after the first stage of correction is performed; receivinga fourth message that contains time information representing a fourthtime at which the third message is received; calculating a secondcorrection value by subtracting the third time at which the thirdmessage is issued from the fourth time represented by the timeinformation which is contained in the fourth message received anddividing a subtraction result obtained thus by 2; and performing asecond stage of correction so that the time on the clock has a valueadded by the second correction value, wherein the clock is configured toincrement the output information time by utilizing a counter that iscounted up with clocks of a predetermined frequency, and the timeinformation which is contained in the second and fourth messagesreceived is a counter value that has not been converted into a unit ofseconds.
 5. The time synchronization method according to claim 4,wherein messages are issued and received using a precision timeprotocol.
 6. An electronic equipment system comprising: a master device;and a slave device, wherein the master device includes: circuitryconfigured to: output time information; issue messages to the slavedevice and receive messages issued from the slave device, wherein thecircuitry is further configured to: issue a first message to the slavedevice at a first time and issue a second message containing timeinformation representing the first time to the slave device at a timelater than the first time; receive a third message that the slave deviceissued at a third time; and issue a fourth message containing timeinformation representing a fourth time, at which the third message isreceived, to the slave device, and the slave device includes: circuitryconfigured to: output time information; receive messages issued from themaster device; issue messages to the master device; calculate acorrection value necessary to correct the output time information; andcorrect the output time information based on the calculated correctionvalue, wherein the circuitry is further configured to: receive a firstmessage that the master device issued at a first time and a secondmessage that contains time information representing the first time andthat the master device issued at a time later than the first time;calculate a first correction value by subtracting the first timerepresented by the time information which is contained in the secondmessage from a second time which is the time at which the first messageis received; perform a first stage of correction so that the output timeinformation has a value subtracted by the calculated first correctionvalue; issue a third message to the master device at a third time afterthe first stage of correction is performed; receive a fourth messagethat contains time information representing a fourth time at which thethird message is received, the fourth message issued by the masterdevice; calculate a second correction value by subtracting the thirdtime at which the third message is issued from the fourth timerepresented by the time information which is contained in the fourthmessage and dividing a subtraction result obtained thus by 2; perform asecond stage of correction after the first stage of correction isperformed so that the output time information has a value added by thecalculated second correction value; and increment the output timeinformation by utilizing a counter that is counted up with clocks of apredetermined frequency, and the time information which is contained inthe second and fourth messages is a counter value that has not beenconverted into a unit of seconds.
 7. The electronic equipment systemaccording to claim 6, wherein the electronic equipment system is acamera system including a plurality of video cameras, and the masterdevice and the slave device are video cameras.
 8. The electronicequipment system according to claim 6, wherein the circuitry of themaster device is further configured to issue and receive messages usinga precision time protocol, and the circuitry of the slave device isfurther configured to issue and receive messages using the precisiontime protocol.
 9. A master device used in a system including the masterdevice and a slave device, the master device comprising: circuitryconfigured to: count up a counter with clocks of a predeterminedfrequency to increment a counter value; output time information thatrepresents the counter value; issue messages to slave device; andreceive messages issued from the slave device wherein the circuitry isfurther configured to: issue a first message to the slave device at afirst time and issue a second message containing the counter value atthe first time to the slave device at a time later than the first time;receive a third message from the slave device issued at a third time;issue a fourth message containing the counter value at a fourth time atwhich the third message is received by the slave device; and the timeinformation which is contained in the second and fourth messages is acounter value that has not been converted into a unit of seconds. 10.The master device according to claim 9, wherein the system is a camerasystem including a plurality of video cameras, and the master device andthe slave device are video cameras.
 11. The master device according toclaim 9, wherein the circuitry is further configured to issue andreceive messages using a precision time protocol.